<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page import="domain.ContactGroup" %>
<jsp:include page="topHtml.jsp" />	
		<% Object[] groups = (Object[])request.getAttribute("groups"); %>
		<form method="post" action="CreateContactServlet">


			<label for="firstName">First Name:</label><input type="text" name="firstName" size="25" /> <br />
			<label for="lastName">Last name:</label> <input type="text" name="lastName" size="30" /> <br />
			<label for="email">Email:</label> <input type="text" name="email" size="25" /> <br />
			<label for="street">Street:</label> <input type="text" name="street" size="25"> <br />
			<label for="zip">Zip:</label> <input type="text" name="zip" size="30" /> <br />
			<label for="city">City: </label> <input type="text" name="city" size="25" /> <br />
			<label for="country">Country: </label><input type="text" name="country" size="25" /> <br /> 
		    <label for="phoneKind">Phone Kind: </label>
		    <select name="phoneKind">
		    	<option value="Home">Home</option>
		    	<option value="Mobile">Mobile</option>
		    	<option value="Office">Office</option>
		    	<option value="Other">Other</option>
		    </select> <br />
			<label for="phoneNumber">Phone Number: </label><input type="text" name="phoneNumber" size="12" /> <br />
			<label for="group">Group: </label>
			<select name="groupIds" multiple="multiple">			
			<% for( Object obj : groups) { %>
				<% ContactGroup cg = (ContactGroup) obj; %>
				<option value="<%= cg.getGroupId() %>"><%= cg.getGroupName() %></option>
			<% } %>
			</select> <br /><br />
			<input type="checkbox" name="entreprise" />Society
			<label for="country">Siret Number: </label><input type="text" name="numSiret" size="25" />
			 <br /><br />
			<input class="button" type="submit" value="Add contact" />
			<input class="button" type="reset" value="Reset" />
		</form>
<jsp:include page="bottomHtml.jsp" />	